package Year22_Month03.day07;

import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        char[] arr = s.toCharArray();
        int index = 0;
        ArrayList<String> myResArr = new ArrayList<>();
        while(index < arr.length){
            if(arr[index] != ' ' && arr[index] != '"'){
               StringBuilder mys = new StringBuilder();
                while(index < arr.length && arr[index] != ' '){
                    mys.append(arr[index]);
                    index++;
                }
                myResArr.add(mys.toString());
                index++;
                continue;
            }
            if(arr[index] != ' '){
                index++;
                StringBuilder mys = new StringBuilder();
                while(index != '"' && index < arr.length){
                    mys.append(arr[index]);
                    index++;
                }
                myResArr.add(mys.toString());
                index++;

            }
        }
        System.out.println(myResArr.size());
        for (int i = 0; i < myResArr.size(); i++) {
            System.out.println(myResArr.get(i));
        }
    }
}
